package io.github.xxyopen.novel.dao.mapper;

import io.github.xxyopen.novel.dao.entity.Practice;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PracticeMapper {

    List<Practice> getPracticeSlider();

    Practice getPracticeById(@Param("id") Integer id);

    void incrClickCount(Long practiceId);

    void incrRealEnrollCount(@Param("practiceId") Long practiceId);

    void updatePractice(Practice practice);

    List<Practice> getRecentPublish();

    List<Practice> getThisWeekHot();

    List<Practice> getRecentDeadline();

    List<Practice> getClickRank();

    List<Practice> searchPractice(@Param("key") String key, @Param("sort") String sort);

    void incrCommentCount(@Param("practiceId") Long practiceId);

    List<Practice> getPracticeSimply();

    List<Practice> getPracticeByIds(List<Long> ids);

    List<Practice> getPracticeByCreateByIds(List<Long> ids);
}
